package com.common.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class FormatUtil {

	private static String DEFAULT_PATTERN = "yyyy-MM:dd HH:mm:ss";
	
	public static String formatDate(Date date) {
		return formatDate(date, DEFAULT_PATTERN);
	}
	
	public static String formatDate(Date date, String pattern) {
		SimpleDateFormat sdf = new SimpleDateFormat(pattern);
		return sdf.format(date);
	}
}
